<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            border: 1px solid red;
        }
        html,body{
            height: 100%;
        }
        .con{
            background: blueviolet;
            height: 50%;
        }
        .header{
            height: 50%;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="header">
            header
        </div>
        <div class="center">
center
        </div>
        <div class="footer">
footer
        </div>
    </div>
</body>
</html>